package edu.byu.intex2.data;

import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.Rectangle;
import java.text.DecimalFormat;
import javax.swing.JFrame;

/**
  * @author Jason Whiting
 */
public class Controller
{

    /////////////////////////////////////////////
    ///   Singleton code
    private static Controller instance = null;

    /** Creates a new instance of EmployeeDAO */
    private Controller()
    {
    }//constructor

    /** Retrieves the single instance of this class */
    public static synchronized Controller getInstance()
    {
        if (instance == null)
        {
            instance = new Controller();
        }
        return instance;
    }//getInstance

    /** Center the JFrame */

    public static double roundTwoDecimals(double d)
    {
        DecimalFormat twoDForm = new DecimalFormat("#.##");
        return Double.valueOf(twoDForm.format(d));
    }
}
